<?php
namespace jianan\models;

use Yii;
use yii\db\ActiveRecord;

class Cus extends ActiveRecord {

	public $jobarea;
	public $huxing;
	public $area;
	public $price;
	public $knowWay;
	public $totalprice;
	public $floortp;
	public $purpose;
	public $floor;
	public $job;



	public static function tableName(){
		return '{{jianan_cus}}';		
	}

	public function ruels(){
		return [
			[['name','phone','type','visitTime','updateTime','sid','address','gender','desc','data','age','sname','degree','saleId','IDNo','tag','country','zipcode','email'],'required'],
			[['name','phone','type','visitTime','updateTime','sid','address','gender','desc','data','age','sname','degree','saleId','IDNo','tag','country','zipcode','email'],'safe'],
			[['name','phone','address','desc','sname','tag','country','zipcode','email'],'string'],
			[['type','visiTime','updateTime','sid','gender','age','degree','slaeId'],'integer']

		];
	}

/*	public function attributeLabels(){

		return [
			'id' => 'ID',
			'name' => '客户名',
			'phone' => '手机号',
			'type' => '客户类型',
			'visiTime' => '来访或来电时间',
			'updateTime' => '最后更新时间',
			'sid' => '操作者ID',
			'address' => '地址',
			'gender' => '性别',
			'desc' => '备注',
			'data' => '数据',
			'age' => '年龄',
			'sname' => '跟办销售',
			'degree' => '购买意向度',
			'saleId' => '销售跟班人ID',
			'IDNo' => '身份证号',
			'tag' => '筹号',
			'country' => '国籍',
			'zipcode' => '邮编',
			'email' => '邮箱'
		];
	}*/

	public static $data=[
		'types'=> [
			1 => '来访客户',
			2 => '来电客户'
		],
		'job' => [
			'601' => '政府公务员',
			'602' => '私营企业主',
			'603' => '企业管理人员',
			'604' => '专业术人员',
			'605' => '医生',
			'606' => '老师',
			'607' => '自由职业',
			'608' => '普通职工',
			'609' => '其他'
		],
		'jobarea' => [
			'701' => '莱城区',
			'702' => '高新区',
			'703' => '钢城区',
			'704' => '其他'
		],
		'area' => [
			'801' => '莱城区',
			'802' => '高新区',
			'803' => '钢城区',
			'804' => '其他'			
		],
		'konwWay' => [
			'901' => '电视媒体',
			'902' => '报纸',
			'903' => '单张',
			'904' => '朋友介绍',
			'905' => '业主介绍',
			'906' => '活动',
			'907' => '销售拓展',
			'908' => '销售展厅',
			'909' => '路过',
			'910' => '网络',
			'911' => '电话营销',
			'912' => '短信'
		],
		'purpose' => [
			'501' => '投资',
			'502' => '自住',
			'503' => '婚房',
			'504' => '养老',
			'505' => '孩子上学'
		],
		'degree' => [
			'401' => '强烈',
			'402' => '一般',
			'403' => '没意向'
		],
		'floorType' => [
			'301' => '洋房',
			'302' => '小高层',
			'303' => '高层'
		],
		'huxing' => [
			'201' => '2房2厅1卫',
			'202' => '3房2厅1卫',
			'203' => '3房2厅2卫',
			'204' => '4房2厅2卫',
			'205' => '4房以上'
		]
	];
}
